<template>
  <div>
    <Row style="margin-bottom: 15px;">
      <i-col :sm="24" :md="12"><p style="color: #aaa;">更新时间：每日08:00</p></i-col>
    </Row>
    <tablePage ref="containerTab" :api="getRailwayAccountList" :param="tabParam" sortName="dataTime" sortType="desc">
      <template slot-scope="props">
        <Table :columns="containerColumn" :data="props.data"></Table>
      </template>
    </tablePage>
  </div>
</template>
<script>
  import tablePage from '@components/table/tablePage.vue'
  import {getRailwayAccountList} from '@api/backEnd/railwayAccount'
  import moment from 'moment'

  export default {
    name: '',
    data () {
      let tabParam = {}
      let containerColumn = [
        {
          title: '企业名称',
          key: 'customerName',
          align: 'center'
        },
        {
          title: '铁路账户站点',
          key: 'staBurName',
          align: 'center'
        },
        {
          title: '余额(元)',
          key: 'amount',
          align: 'center'
        },
        {
          title: '日期',
          ellipsis: true,
          align: 'center',
          key: 'dataTime',
          render: (h, params) => {
            let thisdata = params.row.dataTime
            thisdata = thisdata ? moment(thisdata).format('YYYY-MM-DD') : ''
            return (<span>{thisdata}</span>)
          }
        }
      ]
      let datas = {tabParam, containerColumn, getRailwayAccountList}
      return datas
    },
    methods: {},
    components: {tablePage}
  }
</script>
<style scoped>
  .lh-32 {
    line-height: 32px;
    margin-right: 5px;
  }
</style>
